﻿@model IEnumerable<SuperLottery.AdminPortal.Models.DrawModel>

@{
	Layout = "~/Views/Shared/_DrawLayout.cshtml";
	ViewBag.Title = "最新公告";
}
<p>
	@Html.ActionLink("新增公告", "Create")
</p>
<table id="rounded-corner" style="width: 850px">
	<thead>
		<tr>
			<th scope="col" class="rounded">
				@Html.DisplayNameFor(model => model.DrawDate)
			</th>
			<th scope="col" class="rounded">
				@Html.DisplayNameFor(model => model.IssuerGame)
			</th>
			<th scope="col" class="rounded">
				@Html.DisplayNameFor(model => model.IssueNumber)
			</th>
			<th scope="col" class="rounded">
				@Html.DisplayNameFor(model => model.Numbers)
			</th>
			<th scope="col" class="rounded">
				@Html.DisplayNameFor(model => model.BonusNumbers)
			</th>
			<th scope="col" class="rounded"></th>
		</tr>
	</thead>
	@foreach (var item in Model)
 {
		<tr>
			<td>
				@item.DrawDate.ToString("yyyy/MM/dd")
			</td>
			<td>
				@item.GetIssuerGame()
			</td>
			<td>
				@Html.DisplayFor(modelItem => item.IssueNumber)
			</td>
			<td>
				@Html.DisplayFor(modelItem => item.Numbers)
			</td>
			<td>
				@Html.DisplayFor(modelItem => item.BonusNumbers)
			</td>
			<td>
				@Html.ActionLink("修改", "Edit", new { id = item.Id }) |
                @Html.ActionLink("添加", "Create", new { IssuerGame = item.GetIssuerGame()}) |
				@Html.ActionLink("查看历史", "Index", new { Issuer = item.Issuer, Game = item.Game})
			</td>
		</tr>
 }

</table>
